﻿    using System;
    using System.Linq;
    using System.Collections.Generic;
    using System.Windows.Data;
    using Pivotbrowser.Web;
using System.Windows;
using System.Windows.Media;

    /// <summary>
    /// Two way <see cref="IValueConverter"/> that lets you bind the inverse of a boolean property to a dependency property.
    /// </summary>
    /// 
namespace Pivotbrowser.Helpers
{
    public class StudFachTileConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null)
                return "K.A.";

            if ((value as string).StartsWith("Bachelor"))
                return "BSc.";
            else
                return "MSc.";
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value;
        }
    }
}
